{include file="public/head"/} 
  <body>
    <div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">后台管理</a>
        <a href="">人员管理中心</a>
        <a><cite>审批管理</cite></a>
      </span>
      <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
    </div>
    <div class="x-body">
      <div class="layui-row">
        <!-- <form class="layui-form layui-col-md12 x-so"  method="get" action="{url(admin/Property/propertyList)}">
          <input type="text" name="community"  placeholder="小区名称" autocomplete="off" class="layui-input" value="{if isset($where.community)}{$where.community}{/if}">
          <input type="text" name="owner_phone"  placeholder="业主电话" autocomplete="off" class="layui-input" value="{if isset($where.owner_phone)}{$where.owner_phone}{/if}">

          <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
        </form> -->
      </div>
      <xblock>
        <!-- <button class="layui-btn" onclick="x_admin_show('添加物业','{:url('admin/Property/propertyAdd')}',780,600)"><i class="layui-icon"></i>添加物业</button> -->
        <span class="x-right" style="line-height:40px">共有数据：{$number} 条</span>
      </xblock>
      <table class="layui-table">
        <thead>
          <tr>
            <th>
              <div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>
            </th>
            <th>小区名称</th>
            <th>房号</th>
            <th>关系</th>
            <th>姓名</th>
            <th>手机号</th>
            <th>开始时间</th>
            <th>结束时间</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
          {foreach $list as $lis}
          <tr>
            <td>
              <div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='2'><i class="layui-icon">&#xe605;</i></div>
            </td>
            <td>{$lis.community}</td>
            <td>{$lis.room_id}</td>
            <td>
              {if $lis.relation == 1}
              业主
              {elseif $lis.relation == 2}
              家人
              {elseif $lis.relation == 3}
              租客
              {elseif $lis.relation == 4}
              访客
              {/if}
            </td>
            <td>{$lis.name}</td>
            <td>{$lis.phone}</td>
            <td>{$lis.in_time}</td>
            <td>{$lis.out_time}</td>
            <td class="td-manage">
                <a title="通过" onclick="personnelAllow('{$lis.id}', 'A{$lis.id}')" href="javascript:;" id="A{$lis.id}">
                  <i class="layui-icon">&#xe605;</i>
                </a>
                <a title="删除" onclick="personnelDel('{$lis.id}', 'D{$lis.id}')" href="javascript:;" id="D{$lis.id}">
                  <i class="layui-icon">&#x1006;</i>
                </a>
            </td>
          </tr>
          {/foreach}
        </tbody>
      </table>
      <div class="page">
        <div>
        </div>
      </div>

    </div>
    <script>
      //通过
      function personnelAllow(id, doc){
        if(confirm('身份已核实吗?确定要通过吗？')) 
        { 
          var url = "{:url('personnelresult')}?id=" + id + "&type=1"
          // console.log(url)
          $('#' + doc).attr('href', url)
        } 
          return false; 
      } 

      //删除
      function personnelDel(id, doc){
        if(confirm('身份已核实吗?确定要删除吗?')) 
        { 
          var url = "{:url('personnelresult')}?id=" + id + "&type=2"
          // console.log(url)
          $('#' + doc).attr('href', url)
        } 
          return false; 
      } 

      
    </script>
    <script>var _hmt = _hmt || []; (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
      })();
    </script>
  </body>

</html>